package com.rock.app.config;

import java.util.Map;
import java.util.Set;

import com.eova.interceptor.LoginInterceptor;
import com.jfinal.config.Routes;
import com.jfinal.plugin.activerecord.ActiveRecordPlugin;
import com.rock.app.component.PubCompController;
import com.rock.app.controller.AppFormController;
import com.rock.app.controller.AppCommonController;
import com.rock.app.controller.AttachmentController;
import com.rock.app.controller.WechatMpController;
import com.rock.sys.config.RockMoudleConfig;
import com.rock.sys.model.TSApp;
import com.rock.sys.model.TSAppRelease;
import com.rock.sys.model.TSAppUser;
import com.rock.sys.model.TSComp;
import com.rock.sys.model.TSPage;
import com.rock.sys.model.TSPageComp;
import com.rock.sys.model.TSTenant;
import com.rock.sys.model.TSUserOpenid;
import com.rock.sys.model.TUser;


public class AppMoudleConfig extends RockMoudleConfig {
	
	@Override
	public void routeMoudle(Routes me) {
		System.out.println("app-api模块加载路由");
		
        //小程序API相关
        me.add("/openapi/app", AppCommonController.class);
        me.add("/openapi/wechat/mp", WechatMpController.class);
        me.add("/openapi/appform", AppFormController.class);
        me.add("/openapi/commons/attachment", AttachmentController.class);
        me.add("/openapi/pubcomp", PubCompController.class);
        LoginInterceptor.excludes.add("/openapi/**");
	}

	@Override
	public void mappingMoudle(ActiveRecordPlugin arp) {
		System.out.println("app-api模块加载模型");
	}

	@Override
	public void authMoudle(Map<Integer, Set<String>> auths) {
	}

}